package com.diaosidadui.demo;

import java.util.Scanner;

public class Demo05 {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);


        while (true) {
            System.out.println("请输入星期数");
            int week = sc.nextInt();
            if (week > 0&&week<=7) {
                switch (week) {
//                case 0:
//                    System.out.println("退出");
//                    break loop;
                    case 1:
                        System.out.println("1");
                        break;
                    case 2:
                        System.out.println("2");
                        break;
                    case 3:
                        System.out.println("3");
                        break;
                    case 4:
                        System.out.println("4");
                        break;
                    case 5:
                        System.out.println("5");
                        break;
                    case 6:
                        System.out.println("6");
                        break;
                    case 7:
                        System.out.println("7");
                        break;
//                    default:
//                        System.out.println("");
//                        break;
                }
            } else if (week==0){

                System.out.println("退出");
                break;
            }else{
                System.out.println("输入有误");
            }


        }
    }
}
